import request from '@/utils/request'
import requestAdmin from '@/utils/request_admin'

// 用户登录
export function login (data) {
    return request({
        url: '/do?c=1005',
        method: 'post',
        data
    })
}
// 获取商户信息
export function merchantInfo (data) {
    return request({
        url: '/do?c=1024',
        method: 'post',
        data
    })
}
// 修改密码
export function motifyPwd (data) {
    return request({
        url: '/do?c=1020',
        method: 'post',
        data
    })
}
// 获取用户信息
export function getInfo (token) {
    return request({
        url: 'vue-admin-template/user/info',
        method: 'get',
        params: { token }
    })
}

// 用户退出
export function logout () {
    return request({
        url: 'vue-admin-template/user/logout',
        method: 'post'
    })
}

// 用户菜单权限
export function slidebar (data) {
    return request({
        url: '/do?c=1004',
        method: 'post',
        data
    })
}
// android token
export function androidToken (data) {
    return request({
        url: '/do?c=1050',
        method: 'post',
        data
    })
}
// 获取字典配置
export function configDictionaries (data) {
    return request({
        url: '/do?c=1039',
        method: 'post',
        data
    })
}
const isExperience = false
// 打印小票
export function printOrder (data) {
    if (isExperience) {
        return
    }
    return request({
        url: '/do?c=930002',
        method: 'post',
        data
    })
}
// 获取灰度版本
export function getGrayscaleVersion (data) {
    return requestAdmin({
        url: '/do?c=570001',
        method: 'post',
        data
    })
}
// 查找手环编号
export function getBraceletNumber (data) {
    return request({
        url: '/do?c=220309',
        method: 'post',
        data
    })
}
// 绑定手环
export function bindingBracelet (data) {
    return request({
        url: '/do?c=220200',
        method: 'post',
        data
    })
}